@extends("h5.layouts.main")
@section('content')
<?php

use App\Jobs\Fun;
use App\admin\Service\OA;
use App\Models\MoneyBilModel;

$out_trade_no = $_GET['out_trade_no'] ?? '';
$uid = OA::$user->getId();
$moneyModel = MoneyBilModel::where([
            'out_trade_no' => $out_trade_no
        ])->first();
if (!$moneyModel) {
    Fun::showmsg('订单不存在');
}
if ($uid !== $moneyModel->uid) {
    Fun::showmsg('该订单不属于您的');
}
$uid = OA::$user->getId();
?>
<div class="divbodyH5 moneyDiv">
    <div id="settingTitle">
        <b>订单详情</b>
        <a class="back" href="/h5/my/money/jilu.html"> <img src="/h5/images/return.png" id="settingRtn"></a>
    </div>

    <div class="myTable"> 


        <div class="infoDiv">

            <ul class="ul">
                <li class="li">
                    <div class="pli">
                        <span class="label">支付编码:</span>
                        <span class="value"><?= $moneyModel->out_trade_no ?></span> 
                    </div> 
                </li>

                <li class="li">
                    <div class="pli">
                        <span class="label">类型:</span>
                        <span class="value"><?= MoneyBilModel::getType($moneyModel->type) ?></span> 
                    </div> 
                </li>
                <li class="li">
                    <div class="pli">
                        <span class="label">金额:</span>
                        <span class="value">¥<?= $moneyModel->money ?>元</span> 
                    </div> 
                </li>
                <li class="li">
                    <div class="pli">
                        <span class="label">状态:</span>
                        <span class="value"><?= MoneyBilModel::getstatus($moneyModel->status) ?></span> 
                    </div> 
                </li>

                <li class="li">
                    <div class="pli">
                        <span class="label">时间:</span>
                        <span class="value"><?= Fun::date($moneyModel->time) ?></span> 
                    </div> 
                </li>
                <?php if ($moneyModel->type == MoneyBilModel::type_tixian) { ?>
                    <li class="li">
                        <div class="pli">
                            <span class="label">提现姓名:</span>
                            <span class="value"><?= Fun::encode($moneyModel->tixian_xingming) ?></span> 
                        </div> 
                    </li>

                    <li class="li">
                        <div class="pli">
                            <span class="label">提现账户:</span>
                            <span class="value"><?= Fun::encode($moneyModel->tixian_zhanghu) ?></span> 
                        </div> 
                    </li>
                    <?php if ($moneyModel->status == MoneyBilModel::status_fail) {
                        ?>
                        <li class="li">
                            <div class="pli">
                                <span class="label">提现错误:</span>
                                <span class="value"><?= Fun::encode($moneyModel->msg) ?></span> 
                            </div> 
                        </li>
                        <?php }
                    ?> 
                <?php }elseif($moneyModel->type == MoneyBilModel::type_zhuanchu||$moneyModel->type == MoneyBilModel::type_zhuanru){
                    ?>
                        <li class="li">
                            <div class="pli">
                                <span class="label">转账用户:</span>
                                <span class="value"><?= \App\Models\User\UserModel::idToName($moneyModel->zhuanzhang_uid) ?></span> 
                            </div> 
                        </li>
                        
                        <?php
                }
                if($moneyModel->notes){
                ?>
                <li class="li">
                    <div class="pli">
                        <span class="label">说明:</span>
                        <span class="value"><?= Fun::encode($moneyModel->notes) ?></span>
                    </div>
                </li>
                <?php } ?>
            </ul> 

        </div> 

    </div>



</div>
<script>
    //  new MC.Money.jilu();

</script>

@stop